var status = -1;
var selectionLog = [];

function start(d, c, b) {
    status++;
    var a = -1;
    if (status <= a++) {
        qm.dispose()
    } else {
        if (status === a++) {
            qm.addPopupSay(1013203, 1000, "联盟的勇士原来是怪物?!", "", 0);
            qm.curNodeEventEnd(true);
            qm.setInGameDirectionMode(true, true, true);
            qm.inGameDirectionEvent_AskAnswerTime(5000)
        } else {
            if (status === a++) {
                qm.fieldEffect_KinesisEXP(Math.pow(qm.getLevel(), 3) / 3);
                qm.forceCompleteQuest(33147);
                qm.gainExp(Math.pow(qm.getLevel(), 3) / 3);
                qm.inGameDirectionEvent_AskAnswerTime(3000);
                qm.effect_Voice("Field.img/masteryBook/EnchantSuccess", 100)
            } else {
                if (status === a++) {
                    qm.addPopupSay(1540454, 1000, "撒由那拉!\r\n我们现在回去吧, 队长!", "", 0);
                    qm.inGameDirectionEvent_AskAnswerTime(3500);
                    qm.effect_Voice("Voice3.img/BlackHeaven/3_guffy/9", 100)
                } else {
                    if (status === a++) {
                        qm.updateInfoQuest(33132, "save=6;boss=noclear;board1=Noclear");
                        qm.dispose();
                        qm.warp(350024000, 0, true);
                        qm.setInGameDirectionMode(false, true, false);
                        qm.enableActions()
                    }
                }
            }
        }
    }
}

function end(d, c, b) {
    status++;
    var a = -1;
    if (status <= a++) {
        qm.dispose()
    } else {
        if (status == a++) {
            var e = qm.getQuest();
            qm.askYesNo("这个任务的结束脚本还没有修复哦。它的脚本位于： #b /脚本/任务/#e" + e + "#n.js#k\r\n\r\n如果你有兴趣，欢迎一起来修复！\r\n\r\n那么现在，你要立刻完成这个任务吗？")
        } else {
            if (status == a++) {
                qm.forceCompleteQuest();
                qm.dispose()
            }
        }
    }
};